<template>
    <div class="bread-container">
        <el-breadcrumb separator=">">
            <el-breadcrumb-item :to="{ path: '/' }">首页</el-breadcrumb-item>
            <el-breadcrumb-item :to="{ path: `/category/${detail.categories[1].id}` }">{{ detail.categories[1].name
            }}
            </el-breadcrumb-item>
            <el-breadcrumb-item :to="{ path: `/category/sub/${detail.categories[0].id}` }">{{
                detail.categories[0].name
            }}
            </el-breadcrumb-item>
            <el-breadcrumb-item>{{ detail.name }}</el-breadcrumb-item>
        </el-breadcrumb>
    </div>
</template>

<script setup>
defineProps({
    detail: {
        type: Object,
        default: {}
    }
})
</script>

<style lang="scss" scoped>
.bread-container {
    padding: 25px 0;
}
</style>